home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{54E91B3E-3171-11D3-977A-96567B857403}#2.0#0"; "AMCLABEL.OCX"
- Begin VB.Form Form2
- BackColor = &H000000FF&
- BorderStyle = 3 'Fixed Dialog
- ClientHeight = 3525
- ClientLeft = 45
- ClientTop = 45
- ClientWidth = 4680
- ControlBox = 0 'False
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3525
- ScaleWidth = 4680
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin PAMCLabel.AMCLabel lblTwo
- Height = 285
- Left = 1680
- Top = 1920
- Width = 2715
- _ExtentX = 4789
- _ExtentY = 503
- Caption = "to view the user dictionary."
- AutoSize = -1 'True
- BackColor = 255
- CaptionShadowColor= 8421504
- CaptionHighLightColor= 16777215
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Comic Sans MS"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin PAMCLabel.AMCLabel lblOne
- Height = 285
- Left = 1680
- Top = 1560
- Width = 2640
- _ExtentX = 4657
- _ExtentY = 503
- Caption = "Click the book to the left "
- AutoSize = -1 'True
- BackColor = 255
- CaptionShadowColor= 8421504
- CaptionHighLightColor= 16777215
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Comic Sans MS"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BackColor = &H000000FF&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 840
- Left = 240
- Picture = "Form2.frx":0000
- ScaleHeight = 840
- ScaleWidth = 1185
- TabIndex = 9
- ToolTipText = "User Dictionary"
- Top = 1440
- Width = 1185
- End
- Begin VB.PictureBox picBlock
- BackColor = &H000000FF&
- BorderStyle = 0 'None
- Height = 1695
- Left = 120
- ScaleHeight = 1695
- ScaleWidth = 4455
- TabIndex = 8
- Top = 1080
- Width = 4455
- End
- Begin VB.CommandButton cmdCancel
- BackColor = &H000000FF&
- Cancel = -1 'True
- Caption = "&Cancel"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 2400
- Style = 1 'Graphical
- TabIndex = 7
- Top = 2880
- Width = 1215
- End
- Begin VB.CommandButton cmdOK
- BackColor = &H000000FF&
- Caption = "&OK"
- Default = -1 'True
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 960
- Style = 1 'Graphical
- TabIndex = 6
- Top = 2880
- Width = 1215
- End
- Begin VB.TextBox txtSubject
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF0000&
- Height = 375
- Left = 120
- TabIndex = 2
- Top = 1440
- Width = 4335
- End
- Begin VB.OptionButton optTwoPlayer
- BackColor = &H000000FF&
- Caption = "Two Player"
- BeginProperty Font
- Name = "Comic Sans MS"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 255
- Left = 2160
- TabIndex = 1
- Top = 480
- Width = 1575
- End
- Begin VB.OptionButton optOnePlayer
- BackColor = &H000000FF&
- Caption = "One Player"
- BeginProperty Font
- Name = "Comic Sans MS"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 255
- Left = 600
- TabIndex = 0
- Top = 480
- Value = -1 'True
- Width = 1455
- End
- Begin VB.TextBox txtWord
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF0000&
- Height = 375
- Left = 120
- TabIndex = 4
- Top = 2280
- Width = 4335
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Word"
- ForeColor = &H00C00000&
- Height = 195
- Left = 120
- TabIndex = 5
- Top = 2040
- Width = 390
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Subject"
- ForeColor = &H00C00000&
- Height = 195
- Left = 120
- TabIndex = 3
- Top = 1200
- Width = 540
- End
- Begin VB.Line Line1
- X1 = 120
- X2 = 4440
- Y1 = 960
- Y2 = 960
- End
- Begin VB.Line Line2
- BorderColor = &H00C0C0C0&
- BorderWidth = 2
- X1 = 120
- X2 = 4440
- Y1 = 960
- Y2 = 960
- End
- Attribute VB_Name = "Form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Public Function dash()
- Dim WordLen As Integer
- Dim LenHangWord
- Dim ST
- Dim NewHangWord
- Dim CharHangWord
-
- WordLen = Len(hangWord)
- ST = 1
- LenHangWord = Len(hangWord)
- 'this will place "-" into the word label
- Do While WordLen > 0
- Form1.lblWord.Caption = Form1.lblWord.Caption + "-"
- WordLen = WordLen - 1
- Loop
- 'this will change spaces into "/" in the string hangWord
- Do Until LenHangWord = 0
- CharHangWord = Mid(hangWord, ST, 1)
- LenHangWord = LenHangWord - 1
-
- If CharHangWord = " " Then
- Mid(hangWord, ST) = "/"
- End If
-
- ST = ST + 1
- Loop
- 'this will replace spaces in the word label with "/"
- ST = 1
- LenHangWord = Len(hangWord)
- Do Until LenHangWord = 0
- CharHangWord = Mid(hangWord, ST, 1)
- LenHangWord = LenHangWord - 1
-
- If CharHangWord = "/" Then
- Dim MyString
- MyString = Form1.lblWord.Caption
- Mid(MyString, ST) = "/"
- Form1.lblWord.Caption = MyString
- End If
-
- ST = ST + 1
- Loop
- If hangWord = hangword2 Then
- cmdOk_Click
- End If
- Form1.Show
- End Function
- Private Sub cmdCancel_Click()
- Form1.Enabled = True
- Unload Me
- End Sub
- Private Sub cmdOk_Click()
- Form2.Enabled = True
- If optOnePlayer.Value = True Then
- Dim Time1 'used for random time
- Dim Time2 'used for random time - holds random
- Dim InputData 'used to determine length
- Dim LineNum 'used to determine length - holds length
- Dim MyValue 'Final random
- Dim temp 'holds line
- Dim temp21 'variable, when matched with MyValue will stop a loop
- Dim tempsub 'Holds final Subject
- Dim tempword 'Holds final Word
-
- Time1 = Time
- Time2 = Right(Time1, 1)
- Time2 = Time2 + Rnd
- Time2 = Time2 / 10
-
- Open "Dictionary.txt" For Input As #1
- Do While Not EOF(1)
- Line Input #1, InputData
- LineNum = LineNum + 1
- Loop
- Close #1
-
- MyValue = Int((LineNum * Time2) + 1) '
-
- Open "Dictionary.txt" For Input As #1
- Do While temp21 <> MyValue
-
- Line Input #1, temp
- temp21 = temp21 + 1
- Loop
- Close #1
-
- tempsub = Left(temp, 30)
- Trim tempsub
-
- tempword = Mid(temp, 31)
- tempword = LCase(tempword)
-
- Form1.lblSubject.Caption = tempsub
- hangSubject = tempsub
- hangWord = tempword
- dash 'goto dash function
- Unload Me
-
- Else
- hangWord = LCase(txtWord.Text)
- hangSubject = txtSubject.Text
- If Len(hangWord) = 0 Then
- MsgBox "Enter a word"
- Exit Sub
- End If
-
- If Len(hangSubject) = 0 Then
- MsgBox "Enter a Subject"
- Exit Sub
- End If
-
- Form1.lblSubject.Caption = hangSubject
- MsgBox hangWord
- dash
- Unload Me
- End If
- End Sub
- Private Sub Form_Load()
- Form1.Enabled = False
- End Sub
- Private Sub optOnePlayer_Click()
- txtSubject.Text = ""
- txtSubject.Enabled = False
- txtWord.Text = ""
- txtWord.Enabled = False
- picBlock.Visible = True
- Picture1.Visible = True
- lblOne.Visible = True
- lblTwo.Visible = True
- End Sub
- Private Sub optTwoPlayer_Click()
- txtSubject.Enabled = True
- txtWord.Enabled = True
- picBlock.Visible = False
- Picture1.Visible = False
- lblOne.Visible = False
- lblTwo.Visible = False
- End Sub
- Private Sub Picture1_Click()
- Form5.Show
- Form2.Enabled = False
- End Sub
-